<?php

namespace App\Models;

use App\ModelFilters\QHSchoolPlanFilter;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class Qh_SchoolPlan extends BaseModel
{
    protected $table = 'qh_school_plan';

    protected $guarded = [];

    public function school(): BelongsTo
    {
        return $this->belongsTo(Qh_School::class, 'schoolId');
    }

    public function spec(): BelongsTo
    {
        return $this->belongsTo(Qh_SchoolSpec::class, 'schoolSpecId');
    }

    public function modelFilter(): ?string
    {
        return $this->provideFilter(QHSchoolPlanFilter::class);
    }
}
